package Observers;

/**
 * <p>Title GraphObserver</p>
 *
 * @author YiMing Liu
 * @date 2018/6/14 16:39
 * <p>Description:</p>
 */
public class GraphObserver implements Observer {
    @Override
    public void update(NumberGenerator numberGenerator) {
        System.out.print("GraphObserver:");
        int count = numberGenerator.getNubmer();
        for (int i = 0; i < count; i++) {
            System.out.print("*");
        }
        System.out.println(" ");

        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
